﻿@section scripts
{
    <script>
        $(function () {
            $('.main-content').on("mousewheel DOMMouseScroll", function (e) {
                var delta = parseInt(e.originalEvent.wheelDelta || -e.originalEvent.detail);
                if (Math.abs(delta) >= 120) {
                    delta = delta / 40;
                }
                this.scrollLeft -= (delta * 30);
                e.preventDefault();
            });
        });


    </script>
}

<script id="template/pagination/pagination.html" type="text/ng-template">
    <ul class="menu __inline">
        <li class="menu-item" ng-if="boundaryLinks" ng-class="{__disabled: noprevious()}"><a class="menu-link" href ng-click="selectPage(1)">{{getText('first')}}</a></li>
        <li class="menu-item" ng-if="directionLinks" ng-class="{__disabled: noprevious()}"><a class="menu-link" href ng-click="selectPage(page - 1)">&larr;</a></li>
        <li class="menu-item" ng-repeat="page in pages track by $index" ng-class="{__selected: page.active}"><a class="menu-link" href ng-click="selectPage(page.number)">{{page.text}}</a></li>
        <li class="menu-item" ng-if="directionLinks" ng-class="{__disabled: nonext()}"><a class="menu-link" href ng-click="selectPage(page + 1)">&rarr;</a></li>
        <li class="menu-item" ng-if="boundaryLinks" ng-class="{__disabled: nonext()}"><a class="menu-link" href ng-click="selectPage(totalPages)">{{getText('last')}}</a></li>
    </ul>
</script>

<div ng-class="{'demo-warning': demoResetTime}" ng-if="demoResetTime">
    <span ng-bind-template="This is a demo VirtoCommerce Manager. This site is reset to its original state every day. The next reset will be in about"></span>
    <b ng-bind-template="{{ demoResetTime | amDifference : moment.utc() : 'minutes' | amDurationFormat : 'minutes' }}"></b>.
</div>
<div class="platform-error-bar" ng-if="platformError.title.length" ng-cloak >
    <a class="close" ng-click="closeError()"><i class="fa fa-remove"></i> </a>   
    <div class="error-title">
        {{ platformError.title }}
        <a class="more" href=""  ng-click="platformError.detailVisible = !platformError.detailVisible" ng-if="!platformError.detailVisible">Show me technical details</a>
        <a class="more" href=""  ng-click="platformError.detailVisible = !platformError.detailVisible" ng-if="platformError.detailVisible">Hide the technical details</a>
    </div>
    <div class="error-detail" ng-if="platformError.detailVisible" ng-bind-html="platformError.detail"></div>
</div>

<ui-view></ui-view>

